perm filename MACROS.SAI[PNT,HE]1 blob
sn#327522 filedate 1978-01-06 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 DEFINE ALT ="'775",
C00008 ENDMK
C⊗;
DEFINE ALT ="'775",
SEMC = "'73",
SP = "'40",
CR = "'15",
LF ="'12",
CRLF = "('15&'12)",
DLF = "('15&'12&'12)",
TAB = "'11",
FF = "'14",
! = "COMMENT ",
TV = "'13";
! if /nB is set in the command line then assume he wants a debugging parser;
require "<><>" delimiters;
IFC ¬DECLARATION(#DEBUG) THENC
DEFINE
DECIPHER_DEBUG(A)=<
ASSIGNC A=CVMS(COMPILER!BANNER)[2 TO ∞-1];
ASSIGNC A=CVPS(A)[LENGTH(SCANC(CVPS(A), LF, NULL, "IA"))+1 FOR ∞];
ASSIGNC A=CVPS(A)[LENGTH(SCANC(CVPS(A), TAB, NULL, "IA"))+1 FOR ∞];
ASSIGNC A=CVPS(A)[LENGTH(SCANC(CVPS(A), SP, NULL, "IA"))+1 FOR 1];
"A">;
IFC DECIPHER_DEBUG()="0"
THENC DEFINE #DEBUG=FALSE;
ELSEC DEFINE #DEBUG=TRUE;
EXTERNAL PROCEDURE BAIL;
ENDC
ENDC
DEFINE RCLASS "<>" = <RECORD_CLASS>;
DEFINE RPTR "<>" = <RECORD_POINTER>;
DEFINE RANY "<>" = <RECORD_POINTER(ANY_CLASS)>;
DEFINE ID_TYPE = 1,
INT_TYPE = 2,
REAL_TYPE = 3,
OPERATOR_TYPE = 4,
RES_TYPE = 5,
UNDECLARED_TYPE = 0;
! #TOKEN = ID_TYPE for identifier,
INT_TYPE for integer,
REAL_TYPE for real,
OPERATOR_TYPE for operators,
RES_TYPE for reserved words,
UNDECLARED_TYPE for not declared id's;
DEFINE #SC = 1,
#VT = 2,
#RT = 3,
#TR = 4,
#FR = 5;
DEFINE #INDLK = 0; ! affix type = independent link;
DEFINE #NRGLK = 1; ! affix type = non rigid link;
DEFINE #RGDLK = 2; ! affix type = rigid link;
DEFINE #DEG = "(3.141592653/180.0)"; ! for radians/degrees conversion;
IFCR NOT DECLARATION(#HELP) THENC DEFINE #HELP = TRUE; ENDC
! the program is compiled without
help facilities (?, complete error explanations,
syntax of the istructions..);
IFCR NOT DECLARATION(#KILL) THENC DEFINE #KILL = TRUE; ENDC
! the program is compiled without the KILL
instruction;
IFCR NOT DECLARATION(#DISPL) THENC DEFINE #DISPL = TRUE; ENDC
! the program is without the display;
IFCR NOT DECLARATION(#OUTPT) THENC DEFINE #OUTPT = TRUE; ENDC
! the progaam is without file I/O;
IFCR NOT DECLARATION(#MOVE) THENC DEFINE #MOVE = TRUE; ENDC
! the program is without movements;
IFCR NOT DECLARATION(#INPUT) THENC DEFINE #INPUT = TRUE; ENDC
! the program is without arm interface;
IFCR NOT DECLARATION(#ARROW) THENC DEFINE #ARROW = TRUE; ENDC
! the program is without arm interface;
IFC ¬ #INPUT THENC REDEFINE #MOVE=FALSE; ENDC
DEFINE #INDEF = 0; ! #INDEF for not defined direction in input;
DEFINE #SORRY "<>" = <("sorry, not implemented "&CRLF)>;
! used for non implemented parts message;
DEFINE #NOTYET "<>" = <("yarm not yet available "&CRLF)>;
! used for non implemented parts message;
DEFINE #VERSION "<>" = <("instruction not available in this POINTY version "&CRLF)>;
! used for different version message;